﻿@model IEnumerable<MvcApplication4.Models.Thread>
@{
    Layout = null;
}

@foreach (var item in Model)
{

        <div id = "Thread_Box">
            <div id="Thread_Info">
                <div class = "Thread_Info_Tags"></div>
                <div class = "Thread_Info_text">@Html.ActionLink(@Html.DisplayFor(modelItem => item.Title).ToString(), "ThreadSelected", new { id = item.ThreadId })</div>
                <div class = "Thread_Info_Views">@Html.DisplayFor(modelItem => item.NumViews)</div>
                <div class = "Thread_Info_LastPost">
                    <div class="Thread_Info_Post_User">@Html.DisplayFor(modelItem => item.RecentPostLink.UserLink.UserName)</div> 
                    <div class="Thread_Info_Post_Date">@Html.DisplayFor(modelItem => item.RecentPostLink.Time)</div>
                </div>
            </div>
            <div id="Thread_Details">
                Created by @Html.DisplayFor(modelItem => item.UserLink.UserName) on @Html.DisplayFor(modelItem => item.Time)
            </div>
        </div>
    

}
